package com.third.customer.model.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.third.customer.model.dao.param.UserParam;
import com.third.customer.model.tables.User;

import java.util.Optional;

/**
 * Created by hehuaichun on 2020/5/19.
 */
public interface UserDao {

    boolean insert(User user);

    boolean update(User user);

    boolean deleteById(Long id);

    Optional<User> getById(Long id);

    Optional<User> getByName(Long companyId, String name);

    Page<User> query(UserParam param);
}
